package com.kedacom.demo.springrabbitex.rpc.server;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.kedacom.demo.springrabbitex.rpc.Message;
import com.kedacom.demo.springrabbitex.rpc.ResponseMessage;

public class MessageHandler {

	protected Logger logger = LoggerFactory.getLogger(getClass());

	public ResponseMessage handleMessage(Message message) {
		logger.debug("receive message {}", message);
		return new ResponseMessage("response of " + message.getBody());
	}

	public ResponseMessage handleMessage(ResponseMessage responseMessage) {
		logger.debug("receive message {}", responseMessage);
		return responseMessage;
	}

}
